<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CryptoAuthLib: kit_protocol.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CryptoAuthLib
   </div>
   <div id="projectbrief">Microchip CryptoAuthentication Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00548_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">kit_protocol.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="a00548.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#ifndef KIT_PROTOCOL_H_</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#define KIT_PROTOCOL_H_</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="a00359.html">cryptoauthlib.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">// Define this for debugging communication</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">//#define KIT_DEBUG</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="comment">// The number of bytes to wrap a command in kit protocol.  sizeof(&quot;s:t()\n&lt;null&gt;&quot;)</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="a00993.html#ga8a649555029d4f23edfc15a8c01b2d3d">   45</a></span>&#160;<span class="preprocessor">#define KIT_TX_WRAP_SIZE    (7)</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="comment">// The number of bytes to wrap a response in kit protocol.  sizeof(&quot;&lt;KIT_MSG_SIZE&gt;00()\n&lt;null&gt;&quot;)</span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="a00993.html#ga0810d89c328e48fd91eb604323cca4e9">   48</a></span>&#160;<span class="preprocessor">#define KIT_MSG_SIZE        (32)</span></div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="a00993.html#ga59e33124fc2fa800cc9c90a6ee3ff543">   49</a></span>&#160;<span class="preprocessor">#define KIT_RX_WRAP_SIZE    (KIT_MSG_SIZE + 6)</span></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#ga8fb98d1c372e7e75f99a2f7d1182b877">kit_init</a>(<a class="code" href="a01041.html">ATCAIface</a> iface);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#gac9dc79f9b5281fbe82c20b6af9de76b7">kit_send</a>(<a class="code" href="a01041.html">ATCAIface</a> iface, <span class="keyword">const</span> uint8_t* txdata, <span class="keywordtype">int</span> txlength);</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#ga09a86ccc517208f9c9a057ea569e2a18">kit_receive</a>(<a class="code" href="a01041.html">ATCAIface</a> iface, uint8_t* rxdata, uint16_t* rxsize);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#ga0f09f4b79c681f54b88a8f71bca0d4c4">kit_wrap_cmd</a>(<span class="keyword">const</span> uint8_t* txdata, <span class="keywordtype">int</span> txlength, <span class="keywordtype">char</span>* pkitbuf, <span class="keywordtype">int</span>* nkitbuf, <span class="keywordtype">char</span> target);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#ga8bf59f4218d312568b769b8b8e5c563e">kit_parse_rsp</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* pkitbuf, <span class="keywordtype">int</span> nkitbuf, uint8_t* kitstatus, uint8_t* rxdata, <span class="keywordtype">int</span>* nrxdata);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#gaf7ce58d02b067b956abd32127f5519e9">kit_wake</a>(<a class="code" href="a01041.html">ATCAIface</a> iface);</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#gaeaee19ff7623f0eab9839e68dae583af">kit_idle</a>(<a class="code" href="a01041.html">ATCAIface</a> iface);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<a class="code" href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a> <a class="code" href="a00993.html#gaf6054a0c971830411d5008b94923bdd8">kit_sleep</a>(<a class="code" href="a01041.html">ATCAIface</a> iface);</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;}</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor">#endif // KIT_PROTOCOL_H</span></div><div class="ttc" id="a00993_html_gaf6054a0c971830411d5008b94923bdd8"><div class="ttname"><a href="a00993.html#gaf6054a0c971830411d5008b94923bdd8">kit_sleep</a></div><div class="ttdeci">ATCA_STATUS kit_sleep(ATCAIface iface)</div><div class="ttdoc">Call the sleep for kit protocol.</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:353</div></div>
<div class="ttc" id="a00993_html_gaeaee19ff7623f0eab9839e68dae583af"><div class="ttname"><a href="a00993.html#gaeaee19ff7623f0eab9839e68dae583af">kit_idle</a></div><div class="ttdeci">ATCA_STATUS kit_idle(ATCAIface iface)</div><div class="ttdoc">Call the idle for kit protocol.</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:308</div></div>
<div class="ttc" id="a00359_html"><div class="ttname"><a href="a00359.html">cryptoauthlib.h</a></div><div class="ttdoc">Single aggregation point for all CryptoAuthLib header files.</div></div>
<div class="ttc" id="a00993_html_ga0f09f4b79c681f54b88a8f71bca0d4c4"><div class="ttname"><a href="a00993.html#ga0f09f4b79c681f54b88a8f71bca0d4c4">kit_wrap_cmd</a></div><div class="ttdeci">ATCA_STATUS kit_wrap_cmd(const uint8_t *txdata, int txlen, char *pkitcmd, int *nkitcmd, char target)</div><div class="ttdoc">Wrap binary bytes in ascii kit protocol.</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:406</div></div>
<div class="ttc" id="a00993_html_ga09a86ccc517208f9c9a057ea569e2a18"><div class="ttname"><a href="a00993.html#ga09a86ccc517208f9c9a057ea569e2a18">kit_receive</a></div><div class="ttdeci">ATCA_STATUS kit_receive(ATCAIface iface, uint8_t *rxdata, uint16_t *rxsize)</div><div class="ttdoc">HAL implementation to receive bytes and unwrap from kit protocol. This function calls back to the phy...</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:216</div></div>
<div class="ttc" id="a00993_html_ga8fb98d1c372e7e75f99a2f7d1182b877"><div class="ttname"><a href="a00993.html#ga8fb98d1c372e7e75f99a2f7d1182b877">kit_init</a></div><div class="ttdeci">ATCA_STATUS kit_init(ATCAIface iface)</div><div class="ttdoc">HAL implementation of kit protocol init. This function calls back to the physical protocol to send th...</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:86</div></div>
<div class="ttc" id="a00993_html_ga8bf59f4218d312568b769b8b8e5c563e"><div class="ttname"><a href="a00993.html#ga8bf59f4218d312568b769b8b8e5c563e">kit_parse_rsp</a></div><div class="ttdeci">ATCA_STATUS kit_parse_rsp(const char *pkitbuf, int nkitbuf, uint8_t *kitstatus, uint8_t *rxdata, int *datasize)</div><div class="ttdoc">Parse the response ascii from the kit.</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:462</div></div>
<div class="ttc" id="a00173_html_a22bd6643f31f1d75dc3e7ea939f468cd"><div class="ttname"><a href="a00173.html#a22bd6643f31f1d75dc3e7ea939f468cd">ATCA_STATUS</a></div><div class="ttdeci">ATCA_STATUS</div><div class="ttdef"><b>Definition:</b> atca_status.h:41</div></div>
<div class="ttc" id="a01041_html"><div class="ttname"><a href="a01041.html">atca_iface</a></div><div class="ttdoc">atca_iface is the C object backing ATCAIface. See the atca_iface.h file for details on the ATCAIface ...</div><div class="ttdef"><b>Definition:</b> atca_iface.h:129</div></div>
<div class="ttc" id="a00993_html_gaf7ce58d02b067b956abd32127f5519e9"><div class="ttname"><a href="a00993.html#gaf7ce58d02b067b956abd32127f5519e9">kit_wake</a></div><div class="ttdeci">ATCA_STATUS kit_wake(ATCAIface iface)</div><div class="ttdoc">Call the wake for kit protocol.</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:263</div></div>
<div class="ttc" id="a00993_html_gac9dc79f9b5281fbe82c20b6af9de76b7"><div class="ttname"><a href="a00993.html#gac9dc79f9b5281fbe82c20b6af9de76b7">kit_send</a></div><div class="ttdeci">ATCA_STATUS kit_send(ATCAIface iface, const uint8_t *txdata, int txlength)</div><div class="ttdoc">HAL implementation of kit protocol send. This function calls back to the physical protocol to send th...</div><div class="ttdef"><b>Definition:</b> kit_protocol.c:174</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_97aefd0d527b934f1d99a682da8fe6a9.html">lib</a></li><li class="navelem"><a class="el" href="dir_e870e4dac26de7990352b1cb7547818f.html">hal</a></li><li class="navelem"><a class="el" href="a00548.html">kit_protocol.h</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
